package com.btpn.custody.dao;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.btpn.custody.entity.MasterData;

public interface IMasterData {
	/* =================================================== B A S I C ==================================================== */
	MasterData get(String sid);

	List<MasterData> findAll();

	Integer getCount();

	Serializable create(MasterData masterData);

	void createOrUpdate(MasterData masterData);

	MasterData update(MasterData masterData);

	MasterData merge(MasterData masterData);

	MasterData updateCallback(MasterData masterData);

	void delete(String sid);

	/* =================================================== C U S T O M ================================================== */
	List<MasterData> findByStatus(String status);

	List<MasterData> findByStatuses(String status1, String status2);
	List<MasterData> findByStatuses(String status1, String status2, Date from, Date to);
	
	//FOR TEST
	List<MasterData> findBySIDStatuses(String status1, String status2, String SID);

	// use at DailyEQ
	List<MasterData> findByAreaIdStatuses(Long areaId, String status1, String status2);

	// use at Report05
	List<MasterData> findByAreaIdStatusesDate(Long areaId, String status1, String status2, Date from, Date to);
	List<MasterData> findByBranchIdStatusesDate(Long branchId, String status1, String status2, Date from, Date to);
	List<MasterData> findAllByDateSend(String status1, String status2, Date from, Date to);

	List<MasterData> findByNotInStatuses2DateRange(String status1, String status2, Date from, Date to);

//	List<MasterData> findByNotInStatuses3(String status1, String status2, String status3);

	List<MasterData> findByNasabahType(String nasabahType);

	List<MasterData> findByBranchId(Long branchId);

	// use at BranchServiceImpl
	List<MasterData> findByBranchIdWithStatus(Long branchId, String status);

	// use at BranchServiceImpl
	List<MasterData> findByBranchIdWith2Status(Long branchId, String status1, String status2);

	// use at BranchServiceImpl
//	List<MasterData> findByBranchIdWithNotInStatuses2(Long branchId, String status1, String status2);

	// use at unConpleteDataAction
	List<MasterData> findByBranchIdWithNotInStatuses3DateRange(String status1, String status2, String status3, Date from, Date to);

	List<MasterData> search(Long areaId, String status, String keyword, String branchCode, String accId, String cstId, Date from, Date to);

	MasterData getByCif(String cif);

	// use at GlobalServiceImpl
	List<MasterData> findByStatusBranchCode(String status, String branchCode);
	
	//for related with branch
	public List<MasterData> findByAccount(String status,String Status2, Date from, Date to);
}
